package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.pojo.CreditScoreLog;
import com.example.service.CreditScoreLogService;
import com.example.mapper.CreditScoreLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Ansenown
* @description 针对表【credit_score_log(信用积分变更记录表)】的数据库操作Service实现
* @createDate 2025-05-04 20:27:23
*/
@Service
public class CreditScoreLogServiceImpl extends ServiceImpl<CreditScoreLogMapper, CreditScoreLog>
    implements CreditScoreLogService{

    @Autowired
    private CreditScoreLogMapper creditScoreLogMapper;

    @Override
    public List<CreditScoreLog> getUserCreditLog(Integer userId) {
        List<CreditScoreLog> creditScoreLogList = creditScoreLogMapper.selectList(new QueryWrapper<CreditScoreLog>().eq("user_id",userId));
        return creditScoreLogList;
    }
}




